<template>
	<view class="classlayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :itemObj="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
	// setTimeout(()=>{
	// 	window.location.href = "http://www.gddongyuan.gov.cn/dyzw/sjkf/tjyb/content/post_608337.html"
	// },5000)

import {ref} from 'vue';
import { apiGetClassify } from '@/api/apis.js'
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
const classifyList = ref([])
const getClassify = async()=>{
	let res = await apiGetClassify({
		pageSize:15
	})
	classifyList.value = res.data;
}

//分享给好友
onShareAppMessage(e=>{
	return {
		title:"咸虾米壁纸,精选分类",
		path:"pages/classify/classify"
	}
})

//分享到朋友圈
onShareTimeline(e=>{
	return {
		title:"咸虾米壁纸,精选分类",
		imageUrl:"https://api.qingnian8.com/images/logo-banner.png"
	}
})

getClassify();


</script>

<style lang="scss" scoped>
.classify{
	padding: 30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
}	       
</style>
